package 常用API;

public class Join {
    public static void main(String[] args) throws InterruptedException {
        Thread t = new Thread(new Runnable() {
            @Override
            public void run() {
                System.out.println("t线程 run !");
                while(true){}
            }
        },"t线程");
        t.start();
        t.join();    //一直等待
        //t.join(30000);    //等待30s
        System.out.println("t线程 start ，这里是main !");
    }
}
